package com.ankiang.treeprint.model;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class TRReadpacketList {

    public static int getNextId(List<JSONObject> itemList) {
        int nextId = 0;
        for(int i=0;i<itemList.size();i++){
            JSONObject tmp = itemList.get(i);
            int id = tmp.getIntValue("id");
            if(nextId < id){
                nextId = id;
            }
        }
        nextId += 1;
        return nextId;
    }

}
